#pragma once

#include "IExample.h"

class NetCard : public INetCard
{
public:
    NetCard();
    ~NetCard();
    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv);
    ULONG STDMETHODCALLTYPE AddRef();
    ULONG STDMETHODCALLTYPE Release();
    HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo);
    HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
    HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
    HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
        DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr);
    HRESULT STDMETHODCALLTYPE SetName(BSTR str);
    HRESULT STDMETHODCALLTYPE GetName(BSTR *str);
    HRESULT STDMETHODCALLTYPE SetAddress(BSTR str);
    HRESULT STDMETHODCALLTYPE GetAddress(BSTR *str);

private:
    DWORD m_count;
    BSTR m_name, m_address;
};
